package com.itheima.test;

import org.junit.Test;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;

public class test02 {
    @Test
    public void test01() {

        try {
            File file = new File("D:\\Project\\project02\\health_parent\\health_mobile\\src\\main\\webapp\\pages\\setmeal_detail_" + 48 + ".html");
            if (file.exists()) {
                FileInputStream inputStream = new FileInputStream(file);
                inputStream.close();
                boolean flag = file.delete();
                System.out.println(flag);
                System.out.println(1);
            }
        } catch (Exception e) {
            System.out.println(e);
            System.out.println(2);
        }
    }
}
